import { BrowserRouter, Routes, Route } from 'react-router-dom';
import './App.css';
import 'antd/dist/antd.min.css';
import Layout from '@/pages/Layout';
import Login from '@/pages/Login';
import Home from '@/pages/Home';
import Article from '@/pages/Article'
import Publish from '@/pages/Publish'
import { Auth } from '@/components/Auth'

function App() {
  return (
    <BrowserRouter>
      <div className='App'>
        <Routes>
          <Route path='/' element={<Auth><Layout /></Auth>}>
            <Route index element={<Home></Home>}></Route>
            <Route path='/article' element={<Article></Article>}></Route>
            <Route path='/publish' element={<Publish></Publish>}></Route>
          </Route>
          <Route path='/login' element={<Login></Login>}></Route>
        </Routes>
      </div>
    </BrowserRouter>
  );
}

export default App;
